package day11;

/**
 * @author oldliu
 * @since 1.0
 */
//电风扇
public class USBFan implements Usb {
    private String pinpai;//品牌

    public USBFan(String pinpai) {
        this.pinpai = pinpai;
    }

    public String getPinpai() {
        return pinpai;
    }

    public void setPinpai(String pinpai) {
        this.pinpai = pinpai;
    }

    @Override
    public void plugin() {
        System.out.println(this.pinpai+"接上了usb口，指示灯亮了");
    }

    @Override
    public void unuplug() {
        System.out.println(this.pinpai+"从usb口移除，指示灯灭了");
    }

    @Override
    public void work() {
        System.out.println(this.pinpai+"电风扇扇叶转动，送出凉风！！！");
    }

    @Override
    public String toString() {
        return "这是一个"+this.pinpai+"小风扇";
    }

    @Override
    public void powerOn() {
        System.out.println("指示灯的淡黄色 灯亮了");
    }
}
